-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support BREAKING CHANGE #168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A great start, thanks for sending this! 🙌
Requesting a bit of touchups around testing and types, but nothing major. The implementation looks solid. Nice find on the breakingHeaderPattern
!
src/getCommitMeaning.ts
Outdated
const { notes, type } = conventionalCommitsParser.sync(message, { | ||
// @ts-expect-error - options from https://github.com/conventional-changelog/conventional-changelog/issues/648#issuecomment-704867077 | ||
breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Refactor] No need for a // @ts-expect-error
when an assertion can do:
const { notes, type } = conventionalCommitsParser.sync(message, { | |
// @ts-expect-error - options from https://github.com/conventional-changelog/conventional-changelog/issues/648#issuecomment-704867077 | |
breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/, | |
}); | |
// options from https://github.com/conventional-changelog/conventional-changelog/issues/648#issuecomment-704867077 | |
const { notes, type } = conventionalCommitsParser.sync(message, { | |
breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/, | |
} as object); |
This is actually a great opportunity to clean up the DefinitelyTyped types for conventional-commits-parser
. Is that something you have time for too? No worries if not, I will if you don't. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to deal with it. It’s always exciting to have the opportunity to work on an open source project.
Co-authored-by: Josh Goldberg ✨ <[email protected]>
Co-authored-by: Josh Goldberg ✨ <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
+ Coverage 63.55% 65.78% +2.23%
==========================================
Files 6 6
Lines 107 114 +7
Branches 12 15 +3
==========================================
+ Hits 68 75 +7
Misses 39 39 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, this looks great - thanks! 🙌
Note that the compliance PR action is failing because this PR is sent from https://github.com/hyoban/should-semantic-release/tree/main, rather than a separate branch. https://www.joshuakgoldberg.com/blog/contributing-to-a-create-typescript-app-repository-faqs/#how-do-i-reset-my-main-back-to-the-upstreams has some tips for dealing with that. Not a blocker, just a heads up. 🙂 |
@all-contributors please add @hyoban for code.
|
I've put up a pull request to add @hyoban! 🎉 I couldn't determine any contributions to add, did you specify any contributions? |
Thanks, I'll be careful next time. |
PR Checklist
true
forBREAKING CHANGE
? #139status: accepting prs
Overview
continue #140
related conventional-changelog/conventional-changelog#648